package com.seari.tunnel.service;

import java.util.List;
import java.util.Set;

import com.jframe.mybatis.paginator.domain.PageBounds;
import com.jframe.mybatis.paginator.domain.PageList;
import com.seari.tunnel.entity.Role;
import com.seari.tunnel.entity.User;


public interface IUserService {
	String SERVICE_NAME = "userService";
	
	int countAll();
	PageList<User> findAll();
	PageList<User> findPaging(User user,PageBounds rb);
	
	/**
	 * 根据用户名获取User对象
	 * @param username
	 * @return
	 */
	User getUserByName(String username);
	
	User getUserById(long id);
	
	void updateUser(User user);
	
	void createUser(User user);
	
	void deleteUser(long id);
	
	void deleteUsers(String[] ids);
	
	boolean userNameIsExist(User user);
	
	void updateUserPassword(User user);
	
	Set<String> findRoleByUserName(String userName);
	
	List<Role> findSecurityRole();
	
	void addSecurityRole(Role role);
	
	void updateSecurityRole(Role role);
	
	void deleteSecurityRole(int id);
	
	List<User> findSecurityUser();
	
	void addSecurityUser(User user);
	
	void deleteSecurityUserById(int id);
	
	Role getUserRole(long id);
}
